<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			const IncomingCallModule = uni.requireNativePlugin('IncomingCallPlugin');
				console.log(IncomingCallModule)
			     // 开始监听
			     IncomingCallModule.startListen((res) => {
					 console.log(res)
			       if (res.code === 200) {
			         this.phoneNumber = res.phoneNumber;
			         uni.showToast({
			           title: `来电号码: ${res.phoneNumber}`,
			           icon: 'none'
			         });
			       } else {
			         console.error('监听失败:', res.error);
			       }
			     });
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
